
/**
 * Project Name:cats-zcjc
 * File Name:Station.java
 * Package Name:com.catsic.zcjc.entity
 * Date:2017年10月26日下午4:24:18
 * Copyright (c) 2017, oa.catsic.com All Rights Reserved.
 */
 
package com.catsic.zcjc.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.catsic.base.BaseEntity;


/**
 * ClassName: EquipMaintain
 * Description: 设备维护记录实体类
 * date: 2017年10月26日 下午4:24:18
 * author: xietiebing
 */
@Entity
@Table(name="T_EQUIP_MAINTAIN")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class EquipMaintain extends BaseEntity implements Serializable{


	/**
	 * 
	 */
	private static final long serialVersionUID = -6570776338207616422L;

	/**
	 * collectionTime:采集时间
	 */
	@Column(name="MAINTAIN_TIME")
	private Date maintainTime;
	
	/**
	 * theme:主题
	 */
	@Column(name="THEME")
	private Integer theme;

	
	/**
	 * conclusion:维护结论
	 */
	@Column(name="CONCLUSION")
	private String conclusion;
	
	/**
	 * record:详细记录
	 */
	@Column(name="RECORD")
	private String record;
	
	/**
	 * workmanCode:维护人编号
	 */
	@Column(name="WORKMAN_CODE")
	private String workmanCode;
	
	/**
	 * workmanName:维护人
	 */
	@Column(name="WORKMAN_Name")
	private String workmanName;
	
	/**
	 * equip:所属设备
	 */
	@ManyToOne(fetch = FetchType.LAZY,optional = false)
	@JoinColumn(name="EQUIP_ID",referencedColumnName = "ID")
	private Equip equip;
	
	/**
	 * fileData:维修记录附件
	 */
	@OneToMany(cascade=CascadeType.REMOVE,fetch = FetchType.LAZY,mappedBy="maintainData") 
    private List<MaintainDataFile> fileData;

	public Date getMaintainTime() {
		return maintainTime;
	}

	public void setMaintainTime(Date maintainTime) {
		this.maintainTime = maintainTime;
	}


	public Integer getTheme() {
		return theme;
	}

	public void setTheme(Integer theme) {
		this.theme = theme;
	}


	public String getConclusion() {
		return conclusion;
	}

	public void setConclusion(String conclusion) {
		this.conclusion = conclusion;
	}

	public String getRecord() {
		return record;
	}

	public void setRecord(String record) {
		this.record = record;
	}

	public String getWorkmanCode() {
		return workmanCode;
	}

	public void setWorkmanCode(String workmanCode) {
		this.workmanCode = workmanCode;
	}

	public String getWorkmanName() {
		return workmanName;
	}

	public void setWorkmanName(String workmanName) {
		this.workmanName = workmanName;
	}

	public Equip getEquip() {
		return equip;
	}

	public void setEquip(Equip equip) {
		this.equip = equip;
	}

	@Override
	public String toString() {
		return "EquipMaintain [maintainTime=" + maintainTime + ", theme=" + theme + ", conclusion=" + conclusion
				+ ", record=" + record + ", workmanCode=" + workmanCode + ", workmanName=" + workmanName + ", equip="
				+ equip + "]";
	}

	public List<MaintainDataFile> getFileData() {
		return fileData;
	}

	public void setFileData(List<MaintainDataFile> fileData) {
		this.fileData = fileData;
	}
	
	
}
